<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\controller;

/**
 * 住宿情况查询控制器
 */
class Ask extends AdminBase
{
    
    /**
     * 住宿列表
     */
    public function askList()
    {
        
        $this->assign('list', $this->logicAsk->getAskList());
        
        return $this->fetch('ask_list');
    }
    
    /**
     * 住宿信息添加
     */
    public function askAdd()
    {
        
        IS_POST && $this->jump($this->logicAsk->askEdit($this->param));
        
        return $this->fetch('ask_edit');
    }
    
    /**
     * 住宿信息编辑
     */
    public function askEdit()
    {
        
        IS_POST && $this->jump($this->logicAsk->askEdit($this->param));
        
        //$info = $this->logicAsk->getAskInfo(['id' => $this->param['id']]);

        
        //$this->assign('info', $info);
        
        return $this->fetch('ask_edit');
    }
    
    /**
     * 住宿信息删除
     */
    public function askDel($id = 0)
    {
        
        $this->jump($this->logicAsk->askDel(['id' => $id]));
    }
}
